package com.naiterui.ehp.bs.patient.controller.task;

import com.naiterui.ehp.bp.constants.SwaggerTag;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Api(tags = {SwaggerTag.PATIENT + SwaggerTag.SCHEDULE_TASK})
@Controller
@RequestMapping("ap/task/reservation")
public class ApReservationTaskController {

    private static final Logger LOGGER = LoggerFactory.getLogger(ApReservationTaskController.class);

    /**
     * 15分钟未支付取消订单
     * ReservationTaskController.reservationDetail()
     *
     * @param orderSn
     *
     * @return
     *
     * @Author YongYang
     * @Date 2016年7月28日
     * @since 1.0.0
     */
    @ResponseBody
    @RequestMapping(value = "/noPayOrder")
    @ApiOperation(value = "", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_VALUE)
    public String noPayOrders(String orderSn) {
        /*try {
            LOGGER.info("-----------Reservat-----------ReservationTaskController Method NonPayOrder OrderSn：{}ionTaskController Method NonPayOrder OrderSn：{}", orderSn);
            this.patientReservationService.updateNoPayStatus(orderSn);
            return PublicService.returnValue(ExceptionCodes.SUCCESS);
        } catch (BusinessException b) {
            LOGGER.info("-----------ReservationTaskController Method NonPayOrder OrderSn：{}", orderSn);
            return PublicService.returnValue(b.getCode());
        } catch (Exception e) {
            LOGGER.info("-----------ReservationTaskController Method NonPayOrder OrderSn：{}", orderSn, e);
            return PublicService.returnValue(ExceptionCodes.FAILED);
        }*/
        return null;
    }
}
